<?php
namespace demo;
/**
*
*/
date_default_timezone_set('PRC');


// define('APP',dir(__FILE__));
interface Pay{
	public function setPara();
	public function doPay();
	public function notice();
}

interface Log{
	public function writeLog($file);
}

abstract class Template{
	abstract function display($file);
}

/**
*支付宝支付
*/
class Alipay extends Template implements Pay,Log
{
	public $_aliurl='https://dopay.alipay.com/wap';
	const TARGET ='https://dopay.alipay.com/wap';


	function __construct()
	{
		# code...
	}

	public function display($file){
		echo "显示支付结果";
	}
	public function setPara(){
		echo "设置支付参数";
	}
	public function doPay(){
		echo "挑起支付：".self::TARGET;
		// echo "发起支付";
	}
	public function notice(){
		echo "回调支付";
	}
	public function writeLog($file){
		echo "日志写入成功";
	}


}


/**
* 微信支付
*/
class Wepay implements Pay
{

	function __construct()
	{
		# code...
	}
	public function setPara(){}
	public function doPay(){}
	public function notice(){}



}

$pay = new Alipay();
$pay -> setPara();
echo "<br />";
$pay -> doPay();
echo "<br />";
$pay -> notice();
echo "<br />";
$pay -> writeLog('root');
echo "<br />";
echo $pay::TARGET;
echo "<br />";
echo Alipay::TARGET;
echo "<br />";

// echo $pay->display('root');


?>
